<?php
    /**
    * Show Real Estate Collection List
    * @author: trungdt
    * @since: feb 1, 2011
    * @version: 1.0
    * 
    * Change logs
    * Jun 1, 2011 - trungdt - first create
    * 
    */

    if (!defined('EXPONENT')) exit('');
    $config=$db->selectObject("rswidgetmodule_config","location_data = '".serialize($loc)."'");
    if ($config)
    {
        // only process if configured
        $duan_loc=exponent_core_makeLocation("duanmodule",$config->duan_src,"");
        $duan_loc_sec=serialize($duan_loc);
        $data=$db->selectObjects("duan_collections"," location_data = '{$duan_loc_sec}'");

        foreach ($data as $k=>$v)
        {
            $v->src=unserialize($v->location_data)->src;
        }

        $template = new template('rswidgetmodule',"_duan",$loc);
        $template->assign('data',$data);
        $template->assign('moduletitle',$title);

        $template->output();
    }
?>